<?php
require_once("nusoap-0.9.5/lib/nusoap.php");
$client = new nusoap_client("http://localhost/direktori_belajar/trunk/soap_wsdl/product_list.php");
?>
<html>
<head></head>
<body>
<?php
$error = $client->getError();
if ($error) {
	echo "<h2>Constructor error</h2><pre>" . $error . "</pre>";
}

$result = $client->call("getProd", array("category" => "books"));

if ($client->fault) {
	echo "<h2>Fault</h2><pre>";
	print_r($result);
	echo "</pre>";
} else {
	$error = $client->getError();
	if ($error) {
		echo "<h2>Error</h2><pre>" . $error . "</pre><br>";
	}
	else {
		echo "<h2>Books</h2><pre>";
		echo $result;
		echo "</pre>";
	}
}
?>
</body>
</html>
